<script setup lang="ts">
import { RouterLink, RouterView } from 'vue-router'
import HelloWorld from './components/HelloWorld.vue'
</script>

<template>
  <div class="app">
    <nav class="main-nav">
      <div class="nav-brand">
        <h2>AI Chat App</h2>
      </div>
      <div class="nav-links">
        <RouterLink to="/">首页</RouterLink>
        <RouterLink to="/chat">AI 对话</RouterLink>
        <RouterLink to="/about">关于</RouterLink>
      </div>
    </nav>

    <main class="main-content">
      <RouterView />
    </main>
  </div>
</template>

<style scoped>
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.main-nav {
  background: #fff;
  border-bottom: 1px solid #e0e0e0;
  padding: 0 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  height: 60px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.nav-brand h2 {
  margin: 0;
  color: #007bff;
  font-size: 1.5rem;
  font-weight: 600;
}

.nav-links {
  display: flex;
  gap: 2rem;
}

.nav-links a {
  text-decoration: none;
  color: #666;
  font-weight: 500;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: all 0.2s;
}

.nav-links a:hover {
  color: #007bff;
  background: #f8f9fa;
}

.nav-links a.router-link-active {
  color: #007bff;
  background: #e3f2fd;
}

.main-content {
  flex: 1;
  background: #f5f5f5;
}

@media (max-width: 768px) {
  .main-nav {
    padding: 0 1rem;
    flex-direction: column;
    height: auto;
    padding: 1rem;
  }
  
  .nav-brand {
    margin-bottom: 1rem;
  }
  
  .nav-links {
    gap: 1rem;
  }
}
</style>
